A metronome is a device that produces regular, metrical sounds (e.g., ticks or clicks) according to fixed period or tempo. For example, a metronome can adhere to a tempo defined in beats per minute. In some metronomes, the tempo of the metronome can be adjustable or otherwise user settable.
One common usage of a metronome is to assist a musician during playing of an instrument. For example, a metronome can be used by musicians to help keep a steady tempo as they play, to work on issues of irregular timing, or to help internalize a clear sense of timing and tempo.
As metronomes are used to mark time and assist in keeping a steady tempo, it is important that the operation of the metronome is reliable, consistent, and uninterrupted. For example, a metronome should not skip a beat or otherwise fail to adhere to the correct tempo. Further, the metronome should not cease producing the sound until it is desired by the user to do so.
Certain mobile computing devices (e.g., a smartphone or a tablet computer) can serve as a metronome. In one example, a user can load a webpage in a browser application of the mobile computing device and can interact with the webpage to cause the mobile computing device to serve as a metronome. For example, the mobile computing device can execute instructions included in the webpage which cause the device to regularly produce the sounds according to a desired tempo.
However, mobile browser applications typically impose constraints that make the above described use of the mobile computing device as a metronome difficult. In particular, audio associated with a mobile web browser typically experiences latency or playback issues when the mobile computing device transitions into a lock screen state, turns off the screen, or otherwise changes states or operational modes. Many mobile computing devices automatically transition into such a lock screen state after a period of inactivity.
As one example, certain typical mobile web browsers use the Web Audio API to cause playback of audio by the mobile computing device. However, audio generated on-the-fly via the Web Audio API will automatically be stopped within fifteen seconds of the mobile computing device transitioning into the lock screen state.
Thus, a user can load a webpage in a browser application of the mobile computing device and start the metronome. However, after a certain period (e.g., thirty seconds) the mobile computing device may transition to the lock screen state and the metronome will cease. Such results in a frustrating experience for the user as the metronome operation ends while the user is still practicing and the user is forced to choose between continuing to practice without the metronome or stopping practice to unlock the device and again start the metronome.
As another example, an audio clip that is set to loop or looped via JavaScript executed by the mobile browser application (e.g., as a part of the webpage) will either stop automatically or be affected by increased latency when the screen turns off. Such latency by the device again provides a frustrating experience for the user, as the user may be thrown off-beat or otherwise struggle to adjust their playing to the latency of the device.
Furthermore, certain metronomes implemented through mobile browser applications have varied timing accuracy and consistency even when the screen is on. Such metronomes simply do not provide reliable service.
Thus, metronomes implemented through mobile web browsers are typically unreliable as they may undesirably cease producing sound or skip a beat due to latency upon transition of the mobile computing device into a lock screen state.